forked from pmenglund/vcap-tests
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added cucumber test for simple neo4j application
- Loading branch information
Showing
12 changed files
with
140 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Feature: Neo4j service binding and app deployment | ||
|
||
In order to use Neo4j in AppCloud | ||
As the VMC user | ||
I want to deploy my app against a Neo4j service | ||
|
||
Scenario: Deploy Neo4j | ||
Given I have deployed a Neo4j application that is backed by a Neo4j Service | ||
When I add an answer to my application | ||
Then I should be able see it on the start page | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Simple Neo4j Application that uses the Neo4j graph database service | ||
|
||
Given /^I have deployed a Neo4j application that is backed by a Neo4j Service$/ do | ||
@neo4j_app = create_app NEO4J_APP, @token | ||
@neo4j_service = provision_neo4j_service @token | ||
attach_provisioned_service @neo4j_app, @neo4j_service, @token | ||
upload_app @neo4j_app, @token | ||
start_app @neo4j_app, @token | ||
expected_health = 1.0 | ||
health = poll_until_done @neo4j_app, expected_health, @token | ||
health.should == expected_health | ||
end | ||
|
||
When /^I add an answer to my application$/ do | ||
uri = get_uri @app, "add" | ||
post_record uri, { :question => 'Q1', :answer => 'A1'} | ||
end | ||
|
||
Then /^I should be able see it on the start page$/ do | ||
uri = get_uri @app, "" | ||
contents = get_uri_contents uri | ||
contents.should_not == nil | ||
contents.include?("Q1").should_be true | ||
contents.include?("A1").should_be true | ||
contents.close | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,4 +46,6 @@ builtin_services: | |
token: "0xdeadbeef" | ||
mongodb: | ||
token: "0xdeadbeef" | ||
neo4j: | ||
token: "0xdeadbeef" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
cloud_controller_uri: <%= config.controller_host %> | ||
service: | ||
name: neo4j | ||
version: "1.4" | ||
description: 'Neo4j NOSQL store' | ||
plans: ['free'] | ||
tags: ['neo4j', 'neo4j-1.4', 'nosql'] | ||
host: localhost | ||
token: "0xdeadbeef" | ||
mbus: <%= config.nats_uri %> | ||
log_level: DEBUG | ||
pid: <%= config.working_dir %>/sys/run/neo4j_service.pid | ||
node_timeout: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
local_db: sqlite3:<%= config.working_dir %>/services/neo4j/neo4j_node.db | ||
mbus: <%= config.nats_uri %> | ||
base_dir: <%= config.working_dir %>/services/neo4j/instances | ||
log_level: DEBUG | ||
pid: <%= config.working_dir %>/sys/run/neo4j_node.pid | ||
available_memory: 4096 | ||
max_memory: 128 | ||
node_id: neo4j_node_1 | ||
neo4j_path: <%= config.working_dir %>/services/neo4j | ||
port_range: | ||
first: 45000 | ||
last: 55000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,6 @@ builtin_services: | |
token: "0xdeadbeef" | ||
mongodb: | ||
token: "0xdeadbeef" | ||
|
||
neo4j: | ||
token: "0xdeadbeef" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
cloud_controller_uri: <%= config.controller_host %> | ||
service: | ||
name: neo4j | ||
version: "1.4" | ||
description: 'Neo4j NOSQL store' | ||
plans: ['free'] | ||
tags: ['neo4j', 'neo4j-1.4', 'nosql'] | ||
host: localhost | ||
token: "0xdeadbeef" | ||
mbus: <%= config.nats_uri %> | ||
log_level: DEBUG | ||
pid: <%= config.working_dir %>/sys/run/neo4j_service.pid | ||
node_timeout: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
local_db: sqlite3:<%= config.working_dir %>/services/neo4j/neo4j_node.db | ||
mbus: <%= config.nats_uri %> | ||
base_dir: <%= config.working_dir %>/services/neo4j/instances | ||
log_level: DEBUG | ||
pid: <%= config.working_dir %>/sys/run/neo4j_node.pid | ||
available_memory: 4096 | ||
max_memory: 128 | ||
node_id: neo4j_node_1 | ||
neo4j_path: <%= config.working_dir %>/services/neo4j | ||
port_range: | ||
first: 45000 | ||
last: 55000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters