Skip to content

Commit fbe198e

Browse files
committed
fixing linting issues
1 parent 230f316 commit fbe198e

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

dogfood/client/dogfood_client.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ func printAndLog(logLine string) {
7373
if err != nil {
7474
log.Fatal(err)
7575
}
76-
if err := f.Close(); err != nil {
76+
77+
if err = f.Close(); err != nil {
7778
log.Fatal(err)
7879
}
79-
if _, err := os.Stat("/mnt/data/logging"); errors.Is(err, os.ErrNotExist) {
80+
81+
if _, err = os.Stat("/mnt/data/logging"); errors.Is(err, os.ErrNotExist) {
8082
f, err = os.Create("/mnt/data/logging")
8183
if err != nil {
8284
log.Fatal(err)
@@ -92,6 +94,7 @@ func printAndLog(logLine string) {
9294
if err != nil {
9395
log.Fatal(err)
9496
}
97+
9598
if err = f.Close(); err != nil {
9699
log.Fatal(err)
97100
}
@@ -149,7 +152,9 @@ func stringifyCatalogItems(items []*pb.CatalogItem) string {
149152
func main() {
150153
// create and eventually close connection
151154
printAndLog(fmt.Sprintf("connecting to %v...\n", serverAddr))
155+
152156
var opts []grpc.DialOption
157+
153158
opts = append(opts, grpc.WithInsecure())
154159
opts = append(opts, grpc.WithBlock())
155160

@@ -166,7 +171,7 @@ func main() {
166171

167172
// generate and use client
168173
client := pb.NewChaosDogfoodClient(conn)
169-
174+
170175
printAndLog("We successfully generated the client, getting ready to send requests")
171176

172177
sendsLotsOfRequests(client)

dogfood/tester/dogfood_tester.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,19 @@ func handleRequests() {
5151
}
5252

5353
func main() {
54-
//TODO
54+
// TODO
5555
//1. Wait for a request to run a test
5656
//4. Find out what relevant metrics would be (if only testing CPU, only CPU metrics matter)
57-
//5. Get relevant metrics from datadog for the past 3 minutes
58-
//6. Deploy the version to test
59-
//7. Once the testing version is deployed and read, depending on the request, create individual disruptions
60-
//8. For each disruption, let it bake for 3 minutes
61-
//9. After baking, grab the last 3 minutes of data to compare to the stable 3 minutes of data
62-
//10. If data looks rights, pass the test and move on to the next disruption and repeat starting from 8 until all
57+
//5. Get relevant metrics from datadog for the past 3 minutes, stable metrics
58+
//6. Depending on the request, create individual disruptions
59+
//7. For each disruption, let it bake for 3 minutes
60+
//8. After baking, grab the last 3 minutes of data to compare to the stable 3 minutes of data
61+
//9. If data looks rights, pass the test and move on to the next disruption and repeat starting from 8 until all
6362
// disruptions are completed for the given request
6463
//11. For each disruption removal, wait 2 minutes to make sure the state of world goes back to stable values measured
6564
// in the beginning
66-
//12. Once the entire request is finished, do 1 of 2 things:
67-
// a. If queue is empty, return the chaos controller in the staging cluster back to latest:stable
68-
// b. If queue is not empty, take the next request
6965
STATUS = "initializing"
7066
logger = &zap.SugaredLogger{}
67+
7168
handleRequests()
7269
}

0 commit comments

Comments
 (0)