Skip to content

Commit

Permalink
style: removed incorrect log (keploy#1112)
Browse files Browse the repository at this point in the history
Signed-off-by: Pranshu Srivastava <[email protected]>
Co-authored-by: Ritik Jain <[email protected]>
Former-commit-id: 5f9c40b
  • Loading branch information
PranshuSrivastava and re-Tick authored Nov 14, 2023
1 parent 51fd9e0 commit c418237
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pkg/service/test/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,7 @@ func FilterTcsMocks(tc *models.TestCase, m []*models.Mock, logger *zap.Logger) [
logger.Warn("response timestamp is missing for " + tc.Name)
return m
}
var entMocks, nonKeployMocks []string
for _, mock := range m {
if mock.Version == "api.keploy-enterprise.io/v1beta1" {
entMocks = append(entMocks, mock.Name)
} else if mock.Version != "api.keploy.io/v1beta1" {
nonKeployMocks = append(nonKeployMocks, mock.Name)
}
if mock.Spec.ReqTimestampMock == (time.Time{}) || mock.Spec.ResTimestampMock == (time.Time{}) {
// If mock doesn't have either of one timestamp, then, logging a warning msg and appending the mock to filteredMocks to support backward compatibility.
logger.Warn("request or response timestamp of mock is missing for " + tc.Name)
Expand All @@ -404,11 +398,5 @@ func FilterTcsMocks(tc *models.TestCase, m []*models.Mock, logger *zap.Logger) [
filteredMocks = append(filteredMocks, mock)
}
}
if len(entMocks) > 0 {
logger.Warn("These mocks have been recorded with Keploy Enterprise, may not work properly with the open-source version", zap.Strings("enterprise mocks:", entMocks))
}
if len(nonKeployMocks) > 0 {
logger.Warn("These mocks have not been recorded by Keploy, may not work properly with Keploy.", zap.Strings("non-keploy mocks:", nonKeployMocks))
}
return filteredMocks
}

0 comments on commit c418237

Please sign in to comment.