-
Notifications
You must be signed in to change notification settings - Fork 14
WIP: Single user Idler v for test/debug purpose #284
base: master
Are you sure you want to change the base?
Conversation
In addition to this, it would be nice to maybe flip the 'ShouldIdle' toggle or introduce another toggle to 'IgnoreUser' in prod. That way you could temporarily disable the prod idler for a given user while you run a local debug session to not have it interfere. |
2bb7ca5
to
b128cb7
Compare
"testing" | ||
) | ||
|
||
func XTestSingleIdler(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XTestSingleIdler
is unused
Input: Namespace Basename, OSIO User UUID, CLuster URL and OS User Token Watches builds and deployments in a single namespace relying only on a User token (require admin/edit of -jenkins ns to perform Idle/Unidle) See cmd/fabric8-jenkins-idler-test/main.go for "var"s required. Run on cli go install -ldflags="-X github.com/fabric8-services/fabric8-jenkins-idler/internal/version.version=c931081" ./cmd/fabric8-jenkins-idler-test && fabric8-jenkins-idler-test Or run/debug the test TestSingleIdler in cmd/fabric8-jenkins-idler-test/main_test.go
b128cb7
to
653491f
Compare
} | ||
}() | ||
|
||
for { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use for range instead of for { select {} }
} | ||
}() | ||
|
||
for { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use for range instead of for { select {} }
Input: Namespace Basename, OSIO User UUID, CLuster URL and OS User Token
Watches builds and deployments in a single namespace relying only on a User token
(require admin/edit of -jenkins ns to perform Idle/Unidle)
See cmd/fabric8-jenkins-idler-test/main.go for "var"s required.
Run on cli
Or run/debug the test TestSingleIdler in cmd/fabric8-jenkins-idler-test/main_test.go
Currently uses a copied and modified v of idler.go. The changes are only related to passing in the namespace and switch between calling the 'WatchNamespaceXXX' Openshift Client to watch the Cluster or a given Client. (Trying to avoid changing the original code as much as possible during debugging)