Skip to content

Commit

Permalink
Merge pull request #3907 from krgauraw/release-7.0.0-inquiry
Browse files Browse the repository at this point in the history
Issue #IQ-559 feat: changes for inQuiry
  • Loading branch information
santhosh-tg authored Oct 9, 2023
2 parents 4fd3b75 + a56bd7c commit 9d4add5
Show file tree
Hide file tree
Showing 8 changed files with 661 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ansible/functional-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- hosts: local
become: yes
gather_facts: false
vars_files:
- ['{{inventory_dir}}/secrets.yml']
roles:
- functional-tests
run_once: true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE {{ question_keyspace_name }}.question_data ADD (outcomeDeclaration text, feedback text);
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
CREATE KEYSPACE IF NOT EXISTS {{ hierarchy_keyspace_name }} WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};

CREATE KEYSPACE IF NOT EXISTS {{ question_keyspace_name }} WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};

CREATE TABLE IF NOT EXISTS {{ hierarchy_keyspace_name }}.questionset_hierarchy (
identifier text,
hierarchy text,
instructions text,
outcomeDeclaration text,
PRIMARY KEY (identifier)
);

CREATE TABLE IF NOT EXISTS {{ question_keyspace_name }}.question_data (
identifier text,
body blob,
editorState text,
answer blob,
solutions text,
instructions text,
hints text,
media text,
responseDeclaration text,
interactions text,
outcomeDeclaration text,
feedback text,
PRIMARY KEY (identifier)
);

{% if groups['cassandra-node-2'] is defined %}
ALTER KEYSPACE {{ hierarchy_keyspace_name }} WITH replication = {
'class': 'NetworkTopologyStrategy',
'datacenter1' : 2
};
ALTER KEYSPACE {{ question_keyspace_name }} WITH replication = {
'class': 'NetworkTopologyStrategy',
'datacenter1' : 2
};
{% endif %}
Empty file.
18 changes: 18 additions & 0 deletions ansible/roles/functional-tests/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- name: Create directories
file:
path: functional-tests-files
state: directory
owner: jenkins
group: jenkins
- name: Copy Test Script File
copy:
src: "{{ source_name }}/ft_question_questionset_{{ file_version }}.json"
dest: functional-tests-files/ft_question_questionset_{{ file_version }}.json
- name: Template Env File
template:
src: "{{ source_name }}/env_question_questionset_{{ file_version }}.json"
dest: functional-tests-files/env_question_questionset_{{ file_version }}.json
- name: Trigger Functional Test
shell:
cmd: newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml ; chown -R jenkins:jenkins newman
chdir: functional-tests-files
Loading

0 comments on commit 9d4add5

Please sign in to comment.