mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
Merge pull request #234 from cloudflare/print-version
Print mock version when testing
This commit is contained in:
2
Makefile
2
Makefile
@@ -132,7 +132,7 @@ mock-assets: .build/deps-build-go.ok
|
||||
|
||||
.PHONY: test-go
|
||||
test-go: .build/vendor.ok
|
||||
go test -bench=. -cover `go list ./... | grep -v /vendor/`
|
||||
go test -v -bench=. -cover `go list ./... | grep -v /vendor/`
|
||||
|
||||
.PHONY: test-js
|
||||
test-js: .build/deps-build-node.ok
|
||||
|
||||
@@ -931,6 +931,7 @@ func testAlertGroup(version string, t *testing.T, testCase groupTest, group mode
|
||||
func TestVerifyAllGroups(t *testing.T) {
|
||||
mockConfig()
|
||||
for _, version := range mock.ListAllMocks() {
|
||||
t.Logf("Testing API using mock files from Alertmanager %s", version)
|
||||
mockAlerts(version)
|
||||
r := ginTestEngine()
|
||||
req, _ := http.NewRequest("GET", "/alerts.json", nil)
|
||||
|
||||
@@ -117,6 +117,7 @@ func mockAlerts(version string) {
|
||||
func TestAlerts(t *testing.T) {
|
||||
mockConfig()
|
||||
for _, version := range mock.ListAllMocks() {
|
||||
t.Logf("Testing alerts using mock files from Alertmanager %s", version)
|
||||
mockAlerts(version)
|
||||
r := ginTestEngine()
|
||||
req, _ := http.NewRequest("GET", "/alerts.json?q=@receiver=by-cluster-service,alertname=HTTP_Probe_Failed,instance=web1", nil)
|
||||
@@ -183,6 +184,7 @@ func TestAlerts(t *testing.T) {
|
||||
func TestValidateAllAlerts(t *testing.T) {
|
||||
mockConfig()
|
||||
for _, version := range mock.ListAllMocks() {
|
||||
t.Logf("Validating alerts.json response using mock files from Alertmanager %s", version)
|
||||
mockAlerts(version)
|
||||
r := ginTestEngine()
|
||||
req, _ := http.NewRequest("GET", "/alerts.json?q=alertname=HTTP_Probe_Failed,instance=web1", nil)
|
||||
@@ -354,6 +356,7 @@ var acTests = []acTestCase{
|
||||
func TestAutocomplete(t *testing.T) {
|
||||
mockConfig()
|
||||
for _, version := range mock.ListAllMocks() {
|
||||
t.Logf("Testing autocomplete using mock files from Alertmanager %s", version)
|
||||
mockAlerts(version)
|
||||
r := ginTestEngine()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user