From 1dbd52c5cdfe1471648b6f118a5253b2ba6b97ff Mon Sep 17 00:00:00 2001 From: genofire Date: Thu, 14 Apr 2022 00:38:00 +0200 Subject: [PATCH] add primary_domain_dode maybe fix #211 --- data/nodeinfo.go | 5 +++-- database/all/internel_test.go | 4 ++-- output/all/output_test.go | 10 +++++----- output/filter/inarea/inarea_test.go | 6 ++++++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/data/nodeinfo.go b/data/nodeinfo.go index 87d2600..b33af25 100644 --- a/data/nodeinfo.go +++ b/data/nodeinfo.go @@ -44,8 +44,9 @@ type Owner struct { // System struct type System struct { - SiteCode string `json:"site_code,omitempty"` - DomainCode string `json:"domain_code,omitempty"` + SiteCode string `json:"site_code,omitempty"` + DomainCode string `json:"domain_code,omitempty"` + PrimaryDomainCode string `json:"primary_domain_code,omitempty"` } // Location struct diff --git a/database/all/internel_test.go b/database/all/internel_test.go index fbeffcd..ea9264e 100644 --- a/database/all/internel_test.go +++ b/database/all/internel_test.go @@ -39,13 +39,13 @@ func TestStart(t *testing.T) { }, "b": nil, "c": []map[string]interface{}{ - map[string]interface{}{ + { "path": "c1", }, }, // fetch continue command in Connect "d": []map[string]interface{}{ - map[string]interface{}{ + { "path": "d0", }, }, diff --git a/output/all/output_test.go b/output/all/output_test.go index 45c8469..1b8388f 100644 --- a/output/all/output_test.go +++ b/output/all/output_test.go @@ -50,28 +50,28 @@ func TestStart(t *testing.T) { }) allOutput, err := Register(map[string]interface{}{ "a": []map[string]interface{}{ - map[string]interface{}{ + { "enable": false, "path": "a1", }, - map[string]interface{}{ + { "path": "a2", }, - map[string]interface{}{ + { "enable": true, "path": "a3", }, }, "b": nil, "c": []map[string]interface{}{ - map[string]interface{}{ + { "path": "c1", "filter": map[string]interface{}{}, }, }, // fetch continue command in Connect "d": []map[string]interface{}{ - map[string]interface{}{ + { "path": "d0", }, }, diff --git a/output/filter/inarea/inarea_test.go b/output/filter/inarea/inarea_test.go index 89a3c79..933bd16 100644 --- a/output/filter/inarea/inarea_test.go +++ b/output/filter/inarea/inarea_test.go @@ -3,9 +3,15 @@ package inarea import ( "testing" +<<<<<<< HEAD "github.com/FreifunkBremen/yanic/data" "github.com/FreifunkBremen/yanic/runtime" "github.com/stretchr/testify/assert" +======= + "github.com/stretchr/testify/assert" + "yanic/data" + "yanic/runtime" +>>>>>>> 64b9cfe (add primary_domain_dode) ) func TestFilterInArea(t *testing.T) {