Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
machine424 committed Dec 20, 2024
1 parent cc35bd6 commit c3c064e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/thanos/tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package main

import (
"fmt"
"os"
"testing"

Expand Down Expand Up @@ -49,6 +50,13 @@ func Test_CheckRules_Glob(t *testing.T) {
// Unreadble path
files = &[]string{"./testdata/rules-files/unreadable_valid.yaml"}
filename := (*files)[0]
// TODO: debugging
err := os.Chmod(filename, 0000)
if err != nil {
logger.Log("err", err)
fmt.Println("XXX", err)
}

testutil.Ok(t, os.Chmod(filename, 0000), "failed to change file permissions of %s to 0000", filename)
testutil.NotOk(t, checkRulesFiles(logger, files), "expected err for file %s", files)
testutil.Ok(t, os.Chmod(filename, 0777), "failed to change file permissions of %s to 0777", filename)
Expand Down

0 comments on commit c3c064e

Please sign in to comment.