Skip to content

fix: data race on Systray.SetCurrentConfigFile #1012

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 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
90cce2c
fix
dido18 Jan 20, 2025
c96490b
feat(config): add default configuration file and update config handling
dido18 Jan 21, 2025
7b4859a
fix(.gitignore): add entry to ignore config.ini file
dido18 Jan 21, 2025
279de2a
test(config): add test for writing default config.ini file and update…
dido18 Jan 21, 2025
4f3ac5a
test(config): add tests for retrieving config paths from XDG_CONFIG_H…
dido18 Jan 21, 2025
c41b815
feat(config): pass config path to main loop and update handling
dido18 Jan 22, 2025
716e8fc
refactor(config): revert to use the `config.ini` to default and remo…
dido18 Jan 29, 2025
29a1bf3
refactor(config): remove default config file and update related tests
dido18 Jan 29, 2025
9143b02
feat(config): skip tests if not linux
dido18 Jan 29, 2025
e4e926e
feat(tests): add .gitignore for test data directories
dido18 Jan 29, 2025
3dfa496
fix(tests): handle error when removing config file in test
dido18 Jan 29, 2025
aaa97f9
refactor(main): remove debug print statement for config path
dido18 Jan 29, 2025
f5a9afc
feat(tests): enhance config tests with ini name checks and update tes…
dido18 Jan 29, 2025
9889825
feat(config): update error handling in GetConfigPath and add test for…
dido18 Jan 29, 2025
a8bcfe7
fix(tests): correct ini name in TestGetConfigPathFromHOME test case
dido18 Jan 29, 2025
a0bd3fd
feat(tests): rename tests of config
dido18 Jan 29, 2025
504ce7e
refactor(tests): rename test functions for consistency and clarity
dido18 Jan 29, 2025
870fac5
fix(tests): simplify cleanup in TestIfHomeDoesNotContainConfigTheDefa…
dido18 Jan 29, 2025
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
refactor(tests): rename test functions for consistency and clarity
  • Loading branch information
dido18 committed Jan 29, 2025
commit 504ce7e8825cb0a56dba91433ef14d7e6972069e
122 changes: 0 additions & 122 deletions config/config_linux_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// TestGetConfigPathFromXDG_CONFIG_HOME tests the case when the config.ini is read from XDG_CONFIG_HOME/ArduinoCreateAgent/config.ini
func TestGetConfigPathFromXDG_CONFIG_HOME(t *testing.T) {
func TestGetConfigPathFrom_XDG_CONFIG_HOME(t *testing.T) {
if runtime.GOOS != "linux" {
t.Skip("Skipping test on non-linux OS")
}
Expand All @@ -26,7 +26,7 @@ func TestGetConfigPathFromXDG_CONFIG_HOME(t *testing.T) {
}

// TestGetConfigPathFromHOME tests the case when the config.ini is read from $HOME/.config/ArduinoCreateAgent/config.ini
func TestGetConfigPathFromHOME(t *testing.T) {
func TestGetConfigPathFrom_HOME(t *testing.T) {
if runtime.GOOS != "linux" {
t.Skip("Skipping test on non-linux OS")
}
Expand All @@ -39,7 +39,7 @@ func TestGetConfigPathFromHOME(t *testing.T) {
}

// TestGetConfigPathFromARDUINO_CREATE_AGENT_CONFIG tests the case when the config.ini is read from ARDUINO_CREATE_AGENT_CONFIG env variable
func TestGetConfigPathFromARDUINO_CREATE_AGENT_CONFIG(t *testing.T) {
func TestGetConfigPathFrom_ARDUINO_CREATE_AGENT_CONFIG(t *testing.T) {
if runtime.GOOS != "linux" {
t.Skip("Skipping test on non-linux OS")
}
Expand Down
Loading