fix tests

This commit is contained in:
0xmuralik 2022-11-08 11:59:22 +05:30
parent e112888754
commit 5223e1d58e
10 changed files with 40 additions and 9 deletions

View File

@ -58,7 +58,7 @@ $ ./build/laconicd q nameservice params -o json | jq .
> First you have to Create bond
```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",
"txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F",

View File

@ -209,7 +209,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() {
func(bondId string) {
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
args := []string{
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
@ -353,7 +353,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() {
func(bondId string) {
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
args := []string{
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
@ -626,7 +626,7 @@ func createRecord(bondID string, s *IntegrationTestSuite) {
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
args := []string{
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),

View File

@ -79,7 +79,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryForRecords() {
bondID := GetBondID(s)
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
args := []string{
payloadPath, bondID,
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),

View 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

View File

@ -198,7 +198,7 @@ func (s *IntegrationTestSuite) TestGetCmdSetRecord() {
bondID := GetBondID(s)
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
tc.args = append([]string{payloadPath, bondID}, tc.args...)
}
@ -580,7 +580,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() {
bondID := GetBondID(s)
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
args := []string{
payloadPath, bondID,
@ -822,7 +822,7 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() {
bondID := GetBondID(s)
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/example1.yml"
payloadPath := dir + "/service_provider_example.yml"
txArgs := []string{
payloadPath, bondID,

View File

@ -0,0 +1,6 @@
record:
type: WebsiteRegistrationRecord
url: https://cerc.io
repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
tls_cerc_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

View File

@ -8,4 +8,5 @@ record:
organization_unit: xyz
organization_name: abc
state_name: california
country: US
country: US
locality_name: local

View File

@ -71,6 +71,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
},
},
},
All: true,
},
true,
false,

View File

@ -0,0 +1,5 @@
package types
type Attributes interface {
GetType() string
}

View File

@ -38,6 +38,12 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&MsgDissociateRecords{},
&MsgReAssociateRecords{},
)
registry.RegisterInterface(
"vulcanize.nameservice.v1beta1.ServiceProvideRegistration",
(*Attributes)(nil),
&ServiceProviderRegistration{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}