Skip to content

Commit

Permalink
feat: add tests for GetDomainNameGuesses
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalvas committed Aug 5, 2023
1 parent dfb9054 commit 8191b74
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions fqdn/fqdn_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package fqdn

import (
"reflect"
"testing"
)

func TestGetDomainNameGuesses(t *testing.T) {
domain := "node1.pixconf.vitalvas.dev"
domainSlice := []string{
"node1.pixconf.vitalvas.dev",
"pixconf.vitalvas.dev",
"vitalvas.dev",
"dev",
}

resp := GetDomainNameGuesses(domain)

if !reflect.DeepEqual(resp, domainSlice) {
t.Errorf("wrong split domain, got: %#v", resp)
}
}

0 comments on commit 8191b74

Please sign in to comment.