mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-01-26 05:27:28 +02:00
7fe6384f38
* initial commit: add groups to azure Signed-off-by: andrewphamade@gmail.com <andrewphamade@gmail.com> * fix deprecations and linting errors Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> * remove groups testing from azure provider Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> * fix test error Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> * verify-generate Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> Signed-off-by: andrewphamade@gmail.com <andrewphamade@gmail.com> Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>
38 lines
743 B
Go
38 lines
743 B
Go
package header
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/logger"
|
|
. "github.com/onsi/ginkgo"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var (
|
|
filesDir string
|
|
)
|
|
|
|
func TestHeaderSuite(t *testing.T) {
|
|
logger.SetOutput(GinkgoWriter)
|
|
logger.SetErrOutput(GinkgoWriter)
|
|
|
|
RegisterFailHandler(Fail)
|
|
RunSpecs(t, "Header")
|
|
}
|
|
|
|
var _ = BeforeSuite(func() {
|
|
os.Setenv("SECRET_ENV", "super-secret-env")
|
|
|
|
dir, err := os.MkdirTemp("", "oauth2-proxy-header-suite")
|
|
Expect(err).ToNot(HaveOccurred())
|
|
Expect(os.WriteFile(path.Join(dir, "secret-file"), []byte("super-secret-file"), 0644)).To(Succeed())
|
|
filesDir = dir
|
|
})
|
|
|
|
var _ = AfterSuite(func() {
|
|
os.Unsetenv("SECRET_ENV")
|
|
Expect(os.RemoveAll(filesDir)).To(Succeed())
|
|
})
|