Skip to content

Commit 657dd7a

Browse files
author
Rajat Jindal
committed
fix the error msg
1 parent 0fcbb9e commit 657dd7a

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

kubewatch-in-cluster.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: kubewatch
5+
namespace: default
6+
spec:
7+
containers:
8+
- image: tuna/kubewatch:v0.0.1
9+
imagePullPolicy: Always
10+
name: kubewatch
11+
volumeMounts:
12+
- name: config-volume
13+
mountPath: /root
14+
restartPolicy: Always
15+
volumes:
16+
- name: config-volume
17+
configMap:
18+
name: kubewatch

pkg/handlers/hipchat/hipchat.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ var hipchatColors = map[string]hipchat.Color{
3838
var hipchatErrMsg = `
3939
%s
4040
41-
You need to set both hipchat token and channel for hipchat notify,
42-
using "--token/-t" and "--channel/-c", or using environment variables:
41+
You need to set both hipchat token and room for hipchat notify,
42+
using "--token/-t", "--room/-r", and "--url/-u" or using environment variables:
4343
4444
export KW_HIPCHAT_TOKEN=hipchat_token
45-
export KW_HIPCHAT_CHANNEL=hipchat_channel
45+
export KW_HIPCHAT_ROOM=hipchat_room
46+
export KW_HIPCHAT_URL=hipchat_url (defaults to https://api.hipchat.com/v2)
4647
4748
Command line flags will override environment variables
4849

pkg/handlers/hipchat/hipchat_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ import (
2424
"github.com/skippbox/kubewatch/config"
2525
)
2626

27-
func TestSlackInit(t *testing.T) {
27+
func TestHipchatInit(t *testing.T) {
2828
s := &Hipchat{}
2929
expectedError := fmt.Errorf(hipchatErrMsg, "Missing hipchat token or channel")
3030

3131
var Tests = []struct {
3232
hipchat config.Hipchat
3333
err error
3434
}{
35-
{config.Hipchat{Token: "foo", Channel: "bar"}, nil},
35+
{config.Hipchat{Token: "foo", Room: "bar"}, nil},
3636
{config.Hipchat{Token: "foo"}, expectedError},
37-
{config.Hipchat{Channel: "bar"}, expectedError},
37+
{config.Hipchat{Room: "bar"}, expectedError},
3838
{config.Hipchat{}, expectedError},
3939
}
4040

0 commit comments

Comments
 (0)