diff --git a/sample-agent/apply-yaml.sh b/sample-agent/apply_yaml.sh similarity index 100% rename from sample-agent/apply-yaml.sh rename to sample-agent/apply_yaml.sh diff --git a/sample-agent/generate-test-scripts.sh b/sample-agent/generate-test-scripts.sh index 4b47c29cf..108e13964 100755 --- a/sample-agent/generate-test-scripts.sh +++ b/sample-agent/generate-test-scripts.sh @@ -50,6 +50,7 @@ createOffer: isDefault: true offerLabel: Top Up priceLabel: 200 NOK + productLabel: +1GB createSegments: - id: $SEGMENT_1 EOF @@ -69,6 +70,7 @@ createOffer: isDefault: true offerLabel: Top Up priceLabel: 200 NOK + productLabel: +2GB createSegments: - id: $SEGMENT_2 EOF @@ -87,6 +89,7 @@ createOffer: isDefault: true offerLabel: Special offer priceLabel: 50 NOK + productLabel: +1GB createSegments: - id: $SEGMENT_3 EOF @@ -130,15 +133,15 @@ EOF echo "$0: INFO Successfully created demo scripts in directyory $TARGET_DIR" echo "$0: INFO To initialize run initialization scripts:" echo "$0: INFO" -echo "$0: INFO apply_yaml.sh offer $TARGET_DIR/init1.yml" -echo "$0: INFO apply_yaml.sh offer $TARGET_DIR/init2.yml" -echo "$0: INFO apply_yaml.sh offer $TARGET_DIR/init3.yml" +echo "$0: INFO ./apply_yaml.sh offer $TARGET_DIR/init1.yml" +echo "$0: INFO ./apply_yaml.sh offer $TARGET_DIR/init2.yml" +echo "$0: INFO ./apply_yaml.sh offer $TARGET_DIR/init3.yml" echo "$0: INFO" echo "$0: INFO During the test, run the test steps:" echo "$0: INFO" -echo "$0: INFO apply_yaml.sh segments $TARGET_DIR/step1.yml" -echo "$0: INFO apply_yaml.sh segments $TARGET_DIR/setep2.yml" +echo "$0: INFO ./apply_yaml.sh segments $TARGET_DIR/step1.yml" +echo "$0: INFO ./apply_yaml.sh segments $TARGET_DIR/step2.yml" echo "$0: INFO" echo "$0: INFO To reset to initial state (e.g. before running a demo/test again):" echo "$0: INFO" -echo "$0: INFO apply_yaml.sh segments $TARGET_DIR/reset.yml" +echo "$0: INFO ./apply_yaml.sh segments $TARGET_DIR/reset.yml" diff --git a/tools/neo4j-admin-tools/src/main/resources/init.cypher b/tools/neo4j-admin-tools/src/main/resources/init.cypher index 0dace3e4c..605f88fe0 100644 --- a/tools/neo4j-admin-tools/src/main/resources/init.cypher +++ b/tools/neo4j-admin-tools/src/main/resources/init.cypher @@ -1,6 +1,15 @@ // For country:NO -CREATE (:Product {`id`: '1GB_249NOK', +CREATE (:Product {`id`: '1GB_0NOK', `presentation/isDefault`: 'true', + `presentation/offerLabel`: '', + `presentation/priceLabel`: 'Free', + `presentation/productLabel`: '+1GB', + `price/amount`: '0', + `price/currency`: '', + `properties/noOfBytes`: '1_000_000_000', + `sku`: '1GB_0NOK'}); + +CREATE (:Product {`id`: '1GB_249NOK', `presentation/offerLabel`: 'Default Offer', `presentation/priceLabel`: '249 NOK', `presentation/productLabel`: '+1GB', @@ -40,6 +49,11 @@ CREATE (:Segment {`id`: 'country-no'}); CREATE (:Offer {`id`: 'default_offer-no'}); +MATCH (n:Offer {id: 'default_offer-no'}) +WITH n +MATCH (m:Product {id: '1GB_0NOK'}) +CREATE (n)-[:OFFER_HAS_PRODUCT]->(m); + MATCH (n:Offer {id: 'default_offer-no'}) WITH n MATCH (m:Product {id: '1GB_249NOK'}) @@ -77,8 +91,6 @@ CREATE (:Product {`id`: '1GB_1SGD', `sku`: '1GB_1SGD'}); CREATE (:Product {`id`: '3GB_1.5SGD', - `presentation/isDefault`: 'true', - `presentation/isOffer`: 'true', `presentation/offerLabel`: 'Default Offer', `presentation/priceLabel`: '1.5 SGD', `presentation/productLabel`: '+3GB',