fix tests
This commit is contained in:
parent
e112888754
commit
5223e1d58e
@ -58,7 +58,7 @@ $ ./build/laconicd q nameservice params -o json | jq .
|
|||||||
> First you have to Create bond
|
> First you have to Create bond
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./build/laconicd tx nameservice set ~/Desktop/examples/records/example1.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 --yes -o json
|
$ ./build/laconicd tx nameservice set ~/Desktop/examples/records/service_provider_example.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 --yes -o json
|
||||||
{
|
{
|
||||||
"height": "0",
|
"height": "0",
|
||||||
"txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F",
|
"txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F",
|
||||||
|
@ -209,7 +209,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() {
|
|||||||
func(bondId string) {
|
func(bondId string) {
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
args := []string{
|
args := []string{
|
||||||
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
||||||
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
||||||
@ -353,7 +353,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() {
|
|||||||
func(bondId string) {
|
func(bondId string) {
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
args := []string{
|
args := []string{
|
||||||
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
||||||
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
||||||
@ -626,7 +626,7 @@ func createRecord(bondID string, s *IntegrationTestSuite) {
|
|||||||
|
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
args := []string{
|
args := []string{
|
||||||
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
||||||
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
|
||||||
|
@ -79,7 +79,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryForRecords() {
|
|||||||
bondID := GetBondID(s)
|
bondID := GetBondID(s)
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
args := []string{
|
args := []string{
|
||||||
payloadPath, bondID,
|
payloadPath, bondID,
|
||||||
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
|
||||||
|
12
x/nameservice/client/testutil/service_provider_example.yml
Normal file
12
x/nameservice/client/testutil/service_provider_example.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
record:
|
||||||
|
type: ServiceProviderRegistration
|
||||||
|
bond_id: madeUpBondID
|
||||||
|
laconic_id: madeUpLaconicID
|
||||||
|
x500:
|
||||||
|
common_name: cerc-io
|
||||||
|
organization_unit: xyz
|
||||||
|
organization_name: abc
|
||||||
|
state_name: california
|
||||||
|
country: US
|
||||||
|
locality_name: local
|
@ -198,7 +198,7 @@ func (s *IntegrationTestSuite) TestGetCmdSetRecord() {
|
|||||||
bondID := GetBondID(s)
|
bondID := GetBondID(s)
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
|
|
||||||
tc.args = append([]string{payloadPath, bondID}, tc.args...)
|
tc.args = append([]string{payloadPath, bondID}, tc.args...)
|
||||||
}
|
}
|
||||||
@ -580,7 +580,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() {
|
|||||||
bondID := GetBondID(s)
|
bondID := GetBondID(s)
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
payloadPath, bondID,
|
payloadPath, bondID,
|
||||||
@ -822,7 +822,7 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() {
|
|||||||
bondID := GetBondID(s)
|
bondID := GetBondID(s)
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
sr.NoError(err)
|
sr.NoError(err)
|
||||||
payloadPath := dir + "/example1.yml"
|
payloadPath := dir + "/service_provider_example.yml"
|
||||||
|
|
||||||
txArgs := []string{
|
txArgs := []string{
|
||||||
payloadPath, bondID,
|
payloadPath, bondID,
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
record:
|
||||||
|
type: WebsiteRegistrationRecord
|
||||||
|
url: https://cerc.io
|
||||||
|
repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
|
||||||
|
build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
|
||||||
|
tls_cerc_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
|
@ -9,3 +9,4 @@ record:
|
|||||||
organization_name: abc
|
organization_name: abc
|
||||||
state_name: california
|
state_name: california
|
||||||
country: US
|
country: US
|
||||||
|
locality_name: local
|
@ -71,6 +71,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
All: true,
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
5
x/nameservice/types/attributes.go
Normal file
5
x/nameservice/types/attributes.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
type Attributes interface {
|
||||||
|
GetType() string
|
||||||
|
}
|
@ -38,6 +38,12 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
|
|||||||
&MsgDissociateRecords{},
|
&MsgDissociateRecords{},
|
||||||
&MsgReAssociateRecords{},
|
&MsgReAssociateRecords{},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
registry.RegisterInterface(
|
||||||
|
"vulcanize.nameservice.v1beta1.ServiceProvideRegistration",
|
||||||
|
(*Attributes)(nil),
|
||||||
|
&ServiceProviderRegistration{},
|
||||||
|
)
|
||||||
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user