Package list golang-github-nlopes-slack / 5f046818-5e83-4f73-a88b-e31de9bbd4e3/main slack_test.go
5f046818-5e83-4f73-a88b-e31de9bbd4e3/main

Tree @5f046818-5e83-4f73-a88b-e31de9bbd4e3/main (Download .tar.gz)

slack_test.go @5f046818-5e83-4f73-a88b-e31de9bbd4e3/mainraw · history · blame

package slack

import (
	"log"
	"net/http/httptest"
	"sync"
)

const (
	validToken = "testing-token"
)

var (
	serverAddr string
	once       sync.Once
)

func startServer() {
	server := httptest.NewServer(nil)
	serverAddr = server.Listener.Addr().String()
	log.Print("Test WebSocket server listening on ", serverAddr)
}