Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
functional: introduce a new test TestUnitStatus
Browse files Browse the repository at this point in the history
TestUnitStatus simply checks if "fleetctl status" works.
  • Loading branch information
Dongsu Park committed Apr 11, 2016
1 parent 8412b53 commit 9f347fe
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions functional/unit_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,30 @@ func TestUnitCat(t *testing.T) {
}
}

// TestUnitStatus simply checks "fleetctl status" actually works.
func TestUnitStatus(t *testing.T) {
cluster, err := platform.NewNspawnCluster("smoke")
if err != nil {
t.Fatal(err)
}
defer cluster.Destroy()

m, err := cluster.CreateMember()
if err != nil {
t.Fatal(err)
}
_, err = cluster.WaitForNMachines(m, 1)
if err != nil {
t.Fatal(err)
}

// submit a unit and assert it shows up
_, _, err = cluster.Fleetctl(m, "status")
if err != nil {
t.Fatalf("Unable to get fleet status: %v", err)
}
}

// runListUnits runs fleetctl list-units to verify the actual number of units
// matches with the given expected number. It periodically runs list-units
// waiting until list-units actually shows the expected units.
Expand Down

0 comments on commit 9f347fe

Please sign in to comment.