diff --git a/tests/nns_test.go b/tests/nns_test.go index 1b738d9..e58a24f 100644 --- a/tests/nns_test.go +++ b/tests/nns_test.go @@ -30,7 +30,7 @@ func newNNSInvoker(t *testing.T, addRoot bool) *neotest.ContractInvoker { refresh, retry, expire, ttl := int64(101), int64(102), int64(msPerYear/1000*100), int64(104) c.Invoke(t, true, "register", "com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) } return c } @@ -50,21 +50,21 @@ func TestNNSRegisterTLD(t *testing.T) { c.InvokeFail(t, "invalid domain name format", "register", "0com", c.CommitteeHash, - "email@nspcc.ru", refresh, retry, expire, ttl) + "email@frostfs.info", refresh, retry, expire, ttl) acc := c.NewAccount(t) cAcc := c.WithSigners(acc) cAcc.InvokeFail(t, "not witnessed by committee", "register", "com", acc.ScriptHash(), - "email@nspcc.ru", refresh, retry, expire, ttl) + "email@frostfs.info", refresh, retry, expire, ttl) c.Invoke(t, true, "register", "com", c.CommitteeHash, - "email@nspcc.ru", refresh, retry, expire, ttl) + "email@frostfs.info", refresh, retry, expire, ttl) c.InvokeFail(t, "TLD already exists", "register", "com", c.CommitteeHash, - "email@nspcc.ru", refresh, retry, expire, ttl) + "email@frostfs.info", refresh, retry, expire, ttl) } func TestNNSRegister(t *testing.T) { @@ -75,33 +75,33 @@ func TestNNSRegister(t *testing.T) { c1 := c.WithSigners(c.Committee, accTop) c1.Invoke(t, true, "register", "com", accTop.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) acc := c.NewAccount(t) c2 := c.WithSigners(c.Committee, acc) c2.InvokeFail(t, "not witnessed by admin", "register", "testdomain.com", acc.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c3 := c.WithSigners(accTop, acc) t.Run("domain names with hyphen", func(t *testing.T) { c3.InvokeFail(t, "invalid domain name format", "register", "-testdomain.com", acc.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c3.InvokeFail(t, "invalid domain name format", "register", "testdomain-.com", acc.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c3.Invoke(t, true, "register", "test-domain.com", acc.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) }) c3.Invoke(t, true, "register", "testdomain.com", acc.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) b := c.TopBlock(t) expected := stackitem.NewArray([]stackitem.Item{stackitem.NewBuffer( - []byte(fmt.Sprintf("testdomain.com myemail@nspcc.ru %d %d %d %d %d", + []byte(fmt.Sprintf("testdomain.com myemail@frostfs.info %d %d %d %d %d", b.Timestamp, refresh, retry, expire, ttl)))}) c.Invoke(t, expected, "getRecords", "testdomain.com", int64(nns.SOA)) @@ -195,18 +195,18 @@ func TestNNSUpdateSOA(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(103), int64(104) c.Invoke(t, true, "register", "testdomain.com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) refresh *= 2 retry *= 2 expire *= 2 ttl *= 2 c.Invoke(t, stackitem.Null{}, "updateSOA", - "testdomain.com", "newemail@nspcc.ru", refresh, retry, expire, ttl) + "testdomain.com", "newemail@frostfs.info", refresh, retry, expire, ttl) b := c.TopBlock(t) expected := stackitem.NewArray([]stackitem.Item{stackitem.NewBuffer( - []byte(fmt.Sprintf("testdomain.com newemail@nspcc.ru %d %d %d %d %d", + []byte(fmt.Sprintf("testdomain.com newemail@frostfs.info %d %d %d %d %d", b.Timestamp, refresh, retry, expire, ttl)))}) c.Invoke(t, expected, "getRecords", "testdomain.com", int64(nns.SOA)) } @@ -217,13 +217,13 @@ func TestNNSGetAllRecords(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(103), int64(104) c.Invoke(t, true, "register", "testdomain.com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c.Invoke(t, stackitem.Null{}, "addRecord", "testdomain.com", int64(nns.TXT), "first TXT record") c.Invoke(t, stackitem.Null{}, "addRecord", "testdomain.com", int64(nns.A), "1.2.3.4") b := c.TopBlock(t) - expSOA := fmt.Sprintf("testdomain.com myemail@nspcc.ru %d %d %d %d %d", + expSOA := fmt.Sprintf("testdomain.com myemail@frostfs.info %d %d %d %d %d", b.Timestamp, refresh, retry, expire, ttl) s, err := c.TestInvoke(t, "getAllRecords", "testdomain.com") @@ -257,7 +257,7 @@ func TestExpiration(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(msPerYear/1000*10), int64(104) c.Invoke(t, true, "register", "testdomain.com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) checkProperties := func(t *testing.T, expiration uint64) { expected := stackitem.NewMapWithValue([]stackitem.MapElement{ @@ -295,7 +295,7 @@ func TestNNSSetAdmin(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(103), int64(104) c.Invoke(t, true, "register", "testdomain.com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) acc := c.NewAccount(t) cAcc := c.WithSigners(acc) @@ -318,7 +318,7 @@ func TestNNSIsAvailable(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(103), int64(104) c.Invoke(t, true, "register", "com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c.Invoke(t, false, "isAvailable", "com") c.Invoke(t, true, "isAvailable", "domain.com") @@ -327,7 +327,7 @@ func TestNNSIsAvailable(t *testing.T) { c1 := c.WithSigners(c.Committee, acc) c1.Invoke(t, true, "register", "domain.com", acc.ScriptHash(), - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c.Invoke(t, false, "isAvailable", "domain.com") } @@ -340,7 +340,7 @@ func TestNNSRenew(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(103), int64(104) c1.Invoke(t, true, "register", "testdomain.com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) const msPerYear = 365 * 24 * time.Hour / time.Millisecond b := c.TopBlock(t) @@ -361,7 +361,7 @@ func TestNNSResolve(t *testing.T) { refresh, retry, expire, ttl := int64(101), int64(102), int64(103), int64(104) c.Invoke(t, true, "register", "test.com", c.CommitteeHash, - "myemail@nspcc.ru", refresh, retry, expire, ttl) + "myemail@frostfs.info", refresh, retry, expire, ttl) c.Invoke(t, stackitem.Null{}, "addRecord", "test.com", int64(nns.TXT), "expected result")