Skip to content

Commit

Permalink
Use QEDUrl en monitorConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Feb 19, 2019
1 parent 1f972fd commit fc8765f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gossip/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
)

type Config struct {
QedUrls []string
QEDUrls []string
PubUrls []string
APIKey string
TaskExecutionInterval time.Duration
Expand All @@ -58,8 +58,8 @@ func NewMonitor(conf Config) (*Monitor, error) {

monitor := Monitor{
client: client.NewHTTPClient(client.Config{
Endpoint: conf.QedUrls[0],
APIKey: conf.APIKey,
Endpoint: conf.QEDUrls[0],
APIKey: conf.APIKey,
Insecure: false,
}),
conf: conf,
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func setupMonitor(id int, t *testing.T) (scope.TestF, scope.TestF) {

before := func(t *testing.T) {
monitorConf := monitor.DefaultConfig()
monitorConf.QedUrls = []string{QEDUrl}
monitorConf.QEDUrls = []string{QEDUrl}
monitorConf.PubUrls = []string{StoreURL}
monitorConf.APIKey = APIKey

Expand Down
11 changes: 9 additions & 2 deletions tests/gossip/run_gossip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ if [ ! -f "$keyFile" ]; then
echo -e 'y\n' | ssh-keygen -t ed25519 -N '' -f /var/tmp/id_ed25519
fi

$QED start -k key -l silent --node-id server0 --gossip-addr $qedGossipEndpoint --raft-addr 127.0.0.1:8500 -y $keyFile &
$QED start \
-k key \
-l silent \
--node-id server0 \
--gossip-addr $qedGossipEndpoint \
--raft-addr 127.0.0.1:8500 \
--keypath $keyFile &

pids[0]=$!
sleep 2s

Expand All @@ -41,7 +48,7 @@ done

for i in `seq 1 $3`;
do
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint publisher -k key -l info --bind 127.0.0.1:830$i --join $qedGossipEndpoint --endpoints $snapshotStoreEndpoint --node publisher$i" &
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint publisher -k key -l info --bind 127.0.0.1:830$i --join $qedGossipEndpoint --pubUrls $snapshotStoreEndpoint --node publisher$i" &
pids+=($!)
done

Expand Down

0 comments on commit fc8765f

Please sign in to comment.