From 445c0a60872d2250eea40598d21ed0655cd316a7 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 22 Nov 2021 16:50:15 +0300 Subject: [PATCH] nns: add test for TLD record registration Signed-off-by: Evgenii Stratonikov --- tests/nns_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/nns_test.go b/tests/nns_test.go index 4bf0846..8d3b1cd 100644 --- a/tests/nns_test.go +++ b/tests/nns_test.go @@ -114,6 +114,15 @@ func TestNNSRegister(t *testing.T) { c.Invoke(t, expected, "getRecords", "testdomain.com", int64(nns.TXT)) } +func TestTLDRecord(t *testing.T) { + c := newNNSInvoker(t, true) + c.Invoke(t, stackitem.Null{}, "addRecord", + "com", int64(nns.A), "1.2.3.4") + + result := []stackitem.Item{stackitem.NewByteArray([]byte("1.2.3.4"))} + c.Invoke(t, result, "resolve", "com", int64(nns.A)) +} + func TestNNSUpdateSOA(t *testing.T) { c := newNNSInvoker(t, true)