-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into gomod
# Conflicts: # .travis.yml # Makefile
- Loading branch information
Showing
62 changed files
with
3,947 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package linodego_test | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
) | ||
|
||
func TestListEvents_resizing(t *testing.T) { | ||
if testing.Short() { | ||
t.Skip("Skipping test in short mode.") | ||
} | ||
|
||
client, teardown := createTestClient(t, "fixtures/TestListEvents_resizing") | ||
defer teardown() | ||
|
||
events, err := client.ListEvents(context.Background(), nil) | ||
if err != nil { | ||
t.Errorf("Error getting Events, expected struct, got error %v", err) | ||
} | ||
|
||
// TODO(displague) this test is dependent on specific fixture data, mock it here, or just test | ||
// fixDates directly | ||
if events[2].TimeRemaining != nil { | ||
t.Errorf("Error listing Events, expected resize event time_remaining to be nil, got %v", events[2].TimeRemaining) | ||
} | ||
|
||
if events[1].TimeRemaining == nil || *events[1].TimeRemaining != 0 { | ||
t.Errorf("Error listing Events, expected resize event time_remaining to be 0 seconds, got %v", events[1].TimeRemaining) | ||
} | ||
|
||
if events[0].TimeRemaining == nil || *events[0].TimeRemaining != 60+23 { | ||
t.Errorf("Error listing Events, expected resize event time_remaining to be 83 seconds, got %v", events[0].TimeRemaining) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.