Skip to content

Commit c42ff47

Browse files
author
Geof Holbrook
committed
[gravel-gateway-compat] create new instance of gateway for test
1 parent 3f615d6 commit c42ff47

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/pushgatewayTest.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,16 @@ describe.each([
102102
.post('/metrics', body)
103103
.reply(200);
104104

105-
instance.requireJobName = false;
105+
instance = new Pushgateway(
106+
'http://192.168.99.100:9091',
107+
{
108+
timeout: 10,
109+
requireJobName: false,
110+
},
111+
registry,
112+
);
106113

107-
return instance.pushAdd().then(() => {
108-
instance.requireJobName = true;
109-
return expect(mockHttp.isDone());
110-
});
114+
return instance.pushAdd().then(() => expect(mockHttp.isDone()));
111115
});
112116
});
113117

0 commit comments

Comments
 (0)