Skip to content

Commit

Permalink
update test on minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Khare <[email protected]>
  • Loading branch information
khareyash05 committed Aug 17, 2023
1 parent 099f4f0 commit b8830ac
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test/api/tracker/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

func TestTrackerCRUD(t *testing.T) {
for _, r := range Samples {
t.Run("Tracker CRUD", func(t *testing.T) {
t.Run("Tracker "+r.Kind+" CRUD", func(t *testing.T) {
// Create a sample identity for the tracker.
identity := api.Identity{
Kind: r.Kind,
Expand Down Expand Up @@ -56,7 +56,7 @@ func TestTrackerCRUD(t *testing.T) {
}
})

t.Run("Tracker Project", func(t *testing.T) {
t.Run("Tracker "+r.Kind+" Project", func(t *testing.T) {
// Create a sample identity for the tracker.
identity := api.Identity{
Kind: r.Kind,
Expand All @@ -77,8 +77,7 @@ func TestTrackerCRUD(t *testing.T) {
// else fail the test
if r.Connected == false {
t.Logf("Not connected to Jira(Thus passing the API Test)")
}
if r.Connected == true {
} else {
t.Errorf(err.Error())
}
}
Expand All @@ -95,8 +94,7 @@ func TestTrackerCRUD(t *testing.T) {
if err != nil {
if r.Connected == false {
t.Logf("Not connected to Jira(Thus passing the API Test)")
}
if r.Connected == true {
} else {
t.Errorf(err.Error())
}
}
Expand All @@ -105,8 +103,7 @@ func TestTrackerCRUD(t *testing.T) {
if err != nil {
if r.Connected == false {
t.Logf("Not connected to Jira(Thus passing the API Test)")
}
if r.Connected == true {
} else {
t.Errorf(err.Error())
}
}
Expand Down Expand Up @@ -180,9 +177,6 @@ func AssertEqualTrackers(t *testing.T, got *api.Tracker, expected api.Tracker) {
if got.Connected != expected.Connected {
t.Errorf("Different Connected Got %v, expected %v", got.Connected, expected.Connected)
}
if got.LastUpdated != expected.LastUpdated {
t.Errorf("Different LastUpdated Got %v, expected %v", got.LastUpdated, expected.LastUpdated)
}
if got.Identity.Name != expected.Identity.Name {
t.Errorf("Different Identity's Name Got %v, expected %v", got.Identity.Name, expected.Identity.Name)
}
Expand Down

0 comments on commit b8830ac

Please sign in to comment.