Skip to content

Commit 814ea97

Browse files
committed
test updates
1 parent 9e9eb1d commit 814ea97

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

pkg/cmd/register/register_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ func Test_runRegister_WithOrgFlag(t *testing.T) {
441441
OrganizationId: req.GetOrganizationId(),
442442
Name: req.GetName(),
443443
DeviceId: req.GetDeviceId(),
444+
ConnectivityInfo: &nodev1.ConnectivityInfo{
445+
RegistrationCommand: "netbird up --key abc",
446+
},
444447
},
445448
}, nil
446449
},
@@ -572,8 +575,8 @@ func Test_runRegister_NoSetupCommand(t *testing.T) {
572575
term := terminal.New()
573576
opts := registerOpts{interactive: false, name: "my-spark", orgName: "TestOrg", sshPort: 22}
574577
err := runRegister(context.Background(), term, store, opts, deps)
575-
if err != nil {
576-
t.Fatalf("runRegister failed: %v", err)
578+
if err == nil {
579+
t.Fatal("expected error when no setup command")
577580
}
578581

579582
if setupRunner.called {
@@ -803,6 +806,9 @@ func Test_runRegister_NameValidation(t *testing.T) {
803806
OrganizationId: "org_123",
804807
Name: req.GetName(),
805808
DeviceId: req.GetDeviceId(),
809+
ConnectivityInfo: &nodev1.ConnectivityInfo{
810+
RegistrationCommand: "netbird up --key abc",
811+
},
806812
},
807813
}, nil
808814
},

0 commit comments

Comments
 (0)