Skip to content

Comer/remote ruleset config #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
26f302b
Added remote ruleset logic
Aug 3, 2021
5947155
Added unit tests for remote rule sets
Aug 3, 2021
920fa68
Refactored method name for stylecheck - func isValidUrl should be isV…
Aug 3, 2021
85fe4cf
Refactored method name for stylecheck - func isValidUrl should be isV…
Aug 3, 2021
77d2108
Fixed linting warnings and removed usage of http.get
Aug 3, 2021
91a3885
Removed whitespace and linting warnings
Aug 3, 2021
5d4f398
Refactored code to use newrequestwithcontext
Aug 3, 2021
f6fb076
MAdding more error handling in response text
Aug 4, 2021
0e14eed
Adding additional edge cases for isValidURL
Aug 4, 2021
b64f5f5
Updated README to include documentation on adding remote rulesets
Aug 4, 2021
865618f
Removed TODO comment
Aug 4, 2021
58ece7e
Merge branch 'main' into comer/remote-ruleset-config
Aug 5, 2021
cef7e1b
Adding downloadedRules.yaml to woke ignore
mkcomer Aug 5, 2021
46af11d
Removed DownloadFile functionality and updated remote config to marsh…
Aug 10, 2021
2103fd5
Removed downloadedfile from wokeignore as downloadfile functionality …
Aug 10, 2021
d2c4185
Updated get remote config logic and updated unit tests
Aug 11, 2021
43cb02e
Merge branch 'main' into comer/remote-ruleset-config
mkcomer Aug 12, 2021
11ba44c
docs: autogenerated update for docs/snippets/woke.md: `7eb51d`
github-actions[bot] Sep 29, 2021
9231c98
Merge branch 'get-woke:main' into main
mkcomer Oct 7, 2021
4b1a979
Merge branch 'main' into comer/remote-ruleset-config
Oct 7, 2021
4c82011
Updated request with context to resolve lint error. added tests
Oct 7, 2021
99366dc
Added readme, remove woke binary and coverage report
Oct 8, 2021
09ec3e0
removed space
Oct 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed whitespace and linting warnings
  • Loading branch information
Mary Kate Comer authored and Mary Kate Comer committed Aug 3, 2021
commit 91a3885452fe9b80949d22f739805da94afc535c
6 changes: 2 additions & 4 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func Test_LoadConfig(t *testing.T) {
c, err := loadConfig("https://raw.githubusercontent.com/get-woke/woke/main/example.yaml")
assert.NoError(t, err)
assert.NotNil(t, c)
//delete downloaded file after successful test
// delete downloaded file after successful test
os.Remove("downloadedRules.yaml")
})

Expand All @@ -186,22 +186,20 @@ func Test_isValidURL(t *testing.T) {
boolResponse := isValidURL("/Users/Document/test.yaml")
assert.False(t, boolResponse)
})

}

func Test_DownloadFile(t *testing.T) {
t.Run("valid-url", func(t *testing.T) {
err := DownloadFile("DownloadedFile.yaml", "https://raw.githubusercontent.com/get-woke/woke/main/example.yaml")
assert.NoError(t, err)
//delete downloaded file after successful test
// delete downloaded file after successful test
os.Remove("DownloadedFile.yaml")
})

t.Run("invalid-url", func(t *testing.T) {
err := DownloadFile("DownloadedFile.yaml", "https://raw.githubusercontent.com/get-woke/woke/main/example")
assert.Error(t, err)
})

}

func Test_relative(t *testing.T) {
Expand Down