Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support Org Type
  • Loading branch information
anandrgitnirman authored and anandrgitnirman committed Dec 12, 2019
1 parent 965f356 commit 5594770
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions features/publish_service.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Feature: Publish example service
| Ethereum RPC port | user name | IPFS port |
| 8545 | "snet-user" | 5002 |
Given Organization is added:
| organization |etcd endpoint|group name|
| ExampleOrganization |http://127.0.0.1:2379|default_group|
| organization |etcd endpoint|group name|type|
| ExampleOrganization |http://127.0.0.1:2379|default_group|individual|

Scenario: Publish example-service-services
When example-service service is registered
Expand Down
9 changes: 5 additions & 4 deletions setup_environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ func ipfsIsRunning(portAPI int, portGateway int) (err error) {
func snetIsConfiguredLocalRpc(table *gherkin.DataTable) (err error) {
rpc_port := getTableValue(table, "Ethereum RPC port")
user_name := getTableValue(table, "user name")
ipfs_port := getTableValue(table, "IPFS port")
//ipfs_port := getTableValue(table, "IPFS port")

err = NewCommand().
Run("rm -rf ~/.snet").
//Run("rm -rf ~/.snet").
Run("snet network create local http://localhost:%s", rpc_port).
Run("snet identity create %s rpc --network local", user_name).
Run("snet set default_ipfs_endpoint http://localhost:%s", ipfs_port).
//Run("snet set default_ipfs_endpoint http://localhost:%s", ipfs_port).
Run("snet set current_singularitynettoken_at " + singnetTokenAddress).
Run("snet set current_registry_at " + registryAddress).
Run("snet set current_multipartyescrow_at " + multiPartyEscrow).
Expand All @@ -151,11 +151,12 @@ func organizationIsAdded(table *gherkin.DataTable) (err error) {
organization := getTableValue(table, "organization")
etcd_endpoint := getTableValue(table, "etcd endpoint")
group_name := getTableValue(table, "group name")
org_type := getTableValue(table, "type")

//snet organization add-group group1 0x42A605c07EdE0E1f648aB054775D6D4E38496144 5.5.6.7:8089

err = NewCommand().
Run("snet organization metadata-init %s %s", organization, organization).
Run("snet organization metadata-init %s %s %s", organization, organization, org_type).
Run("snet organization add-group %s `snet account print --wallet-index 1` %s ", group_name, etcd_endpoint).
Run("snet organization create %s -y", organization).
Err()
Expand Down

0 comments on commit 5594770

Please sign in to comment.