From 5594770945140ed3eb2cd8fe3884af6dbf0f530b Mon Sep 17 00:00:00 2001 From: anandrgitnirman Date: Thu, 12 Dec 2019 15:22:39 +0530 Subject: [PATCH 1/2] #44 Support Org Type --- features/publish_service.feature | 4 ++-- setup_environment_test.go | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/features/publish_service.feature b/features/publish_service.feature index 6febc89..0966940 100644 --- a/features/publish_service.feature +++ b/features/publish_service.feature @@ -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 diff --git a/setup_environment_test.go b/setup_environment_test.go index f86fea1..320ddf7 100644 --- a/setup_environment_test.go +++ b/setup_environment_test.go @@ -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). @@ -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() From e08668a9d9041e37e0a7726e2f7e611495d4405f Mon Sep 17 00:00:00 2001 From: anandrgitnirman Date: Thu, 12 Dec 2019 15:24:59 +0530 Subject: [PATCH 2/2] #44 Support Org Type Revert back to the old version on ipfs configs --- setup_environment_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup_environment_test.go b/setup_environment_test.go index 320ddf7..53b4336 100644 --- a/setup_environment_test.go +++ b/setup_environment_test.go @@ -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).