forked from vmware-archive/gangway
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from jcrood/build-n-docs
Hopefully enable image pushes, update documentation, add fs tests.
- Loading branch information
Showing
5 changed files
with
164 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Changelog | ||
|
||
|
||
## v3.4.0 (Unreleased) | ||
|
||
### UI improments | ||
|
||
Adds Windows Powershell instructions, cleans up templates and bakes in the required | ||
css and js assets, allowing Gangway to function without an internet connection. Shows | ||
cluster name on homepage. Mostly based on PR https://github.com/vmware-archive/gangway/pull/137 | ||
|
||
Fixes: | ||
- https://github.com/vmware-archive/gangway/issues/102 | ||
- https://github.com/vmware-archive/gangway/issues/135 | ||
- https://github.com/vmware-archive/gangway/issues/136 | ||
- https://github.com/vmware-archive/gangway/issues/177 | ||
- https://github.com/vmware-archive/gangway/issues/189 | ||
|
||
### Support self-signed CA | ||
|
||
Adds an `idp-certificate-authority-data` to the kubectl config to allow it to renew tokens | ||
when the IDP uses a self-signed CA. Merged from https://github.com/vmware-archive/gangway/pull/94 | ||
|
||
|
||
### Allow custom assets to be used in custom templates | ||
|
||
Adds the `customAssetsDir` config option to override the contents of /assets/ for use in | ||
custom templates. | ||
|
||
### todo | ||
|
||
... | ||
|
||
### Other minor stuff | ||
|
||
* Update to Go 1.18 | ||
* Update dependencies | ||
* Replace esc with go:embed | ||
* Root path check (https://github.com/vmware-archive/gangway/pull/143) | ||
* Fix URL encoding (https://github.com/vmware-archive/gangway/pull/179) | ||
* BREAKING - corrected ENV variable name of `customHTMLTemplatesDir` to `CUSTOM_HTML_TEMPLATES_DIR`, | ||
this was (incorrectly) `CUSTOM_HTTP_TEMPLATES_DIR` | ||
* Config option `showClaims` to show/hide received claims | ||
|
||
|
||
## v3.3.0 (2021-07-15) | ||
|
||
All the stuff it did before, see https://github.com/vmware-archive/gangway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package assets_test | ||
|
||
import ( | ||
"errors" | ||
"github.com/jcrood/gangway/assets" | ||
"io/fs" | ||
"testing" | ||
) | ||
|
||
func TestAssetFS(t *testing.T) { | ||
t.Run("finds gangway assets", func(t *testing.T) { | ||
filenames := []string{"gangway.css", "gangway.js"} | ||
var missing, empty []string | ||
|
||
for _, filename := range filenames { | ||
file, err := assets.FS.ReadFile(filename) | ||
if err != nil { | ||
if errors.Is(err, fs.ErrNotExist) { | ||
missing = append(missing, filename) | ||
continue | ||
} | ||
t.Fatalf("failed to open asset %s: %v", filename, err) | ||
} | ||
if len(file) == 0 { | ||
empty = append(empty, filename) | ||
} | ||
} | ||
if len(missing) > 0 { | ||
t.Fatalf("couldn't find asset: %v", missing) | ||
} | ||
if len(empty) > 0 { | ||
t.Fatalf("empty assets: %v", empty) | ||
} | ||
}) | ||
|
||
t.Run("does not include non-assets", func(t *testing.T) { | ||
filenames := []string{"fs.go", "fs_test.go"} | ||
var found []string | ||
|
||
for _, filename := range filenames { | ||
_, err := assets.FS.ReadFile(filename) | ||
if err != nil { | ||
if errors.Is(err, fs.ErrNotExist) { | ||
continue | ||
} | ||
t.Fatalf("failed to open asset %s: %v", filename, err) | ||
} | ||
found = append(found, filename) | ||
} | ||
if len(found) > 0 { | ||
t.Fatalf("found files: %v", found) | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package templates_test | ||
|
||
import ( | ||
"errors" | ||
"github.com/jcrood/gangway/templates" | ||
"io/fs" | ||
"testing" | ||
) | ||
|
||
func TestTemplateFS(t *testing.T) { | ||
t.Run("finds templates", func(t *testing.T) { | ||
filenames := []string{"commandline.tmpl", "home.tmpl"} | ||
var missing, empty []string | ||
|
||
for _, filename := range filenames { | ||
file, err := templates.FS.ReadFile(filename) | ||
if err != nil { | ||
if errors.Is(err, fs.ErrNotExist) { | ||
missing = append(missing, filename) | ||
continue | ||
} | ||
t.Fatalf("failed to open template %s: %v", filename, err) | ||
} | ||
if len(file) == 0 { | ||
empty = append(empty, filename) | ||
} | ||
} | ||
if len(missing) > 0 { | ||
t.Fatalf("couldn't find templates: %v", missing) | ||
} | ||
if len(empty) > 0 { | ||
t.Fatalf("empty templates: %v", empty) | ||
} | ||
}) | ||
|
||
t.Run("does not include non-templates", func(t *testing.T) { | ||
filenames := []string{"fs.go", "fs_test.go"} | ||
var found []string | ||
|
||
for _, filename := range filenames { | ||
_, err := templates.FS.ReadFile(filename) | ||
if err != nil { | ||
if errors.Is(err, fs.ErrNotExist) { | ||
continue | ||
} | ||
t.Fatalf("failed to open template %s: %v", filename, err) | ||
} | ||
found = append(found, filename) | ||
} | ||
if len(found) > 0 { | ||
t.Fatalf("found files: %v", found) | ||
} | ||
}) | ||
} |