Skip to content

Commit f85264d

Browse files
committed
fix: update file paths for event configurations in tests and settings
1 parent 5fe979c commit f85264d

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

config/tg-notifier.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
/** Set the path to the data file */
4343
'data_file' => [
4444
'setting' => $_ENV['TGN_PATH_SETTING'] ??
45-
'config/jsons/tgn-settings.json',
45+
'storage/json/tgn/tgn-settings.json',
4646

4747
'platform' => [
4848
'gitlab' => $_ENV['TGN_PATH_PLATFORM_GITLAB'] ??
49-
'config/jsons/gitlab-events.json',
49+
'storage/json/tgn/gitlab-events.json',
5050
'github' => $_ENV['TGN_PATH_PLATFORM_GITHUB'] ??
51-
'config/jsons/github-events.json',
51+
'storage/json/tgn/github-events.json',
5252
],
5353
],
5454

tests/ConfigTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
});
2222

2323
it('platform can be set for event with platform file', function () {
24-
$this->bot->setPlatFormForEvent('gitlab', 'config/jsons/gitlab-events.json');
24+
$this->bot->setPlatFormForEvent('gitlab', 'storage/json/tgn/gitlab-events.json');
2525
expect($this->bot->event->platform)->toBe('gitlab')
2626
->and($this->bot->event->platformFile)
27-
->toBe('config/jsons/gitlab-events.json');
27+
->toBe('storage/json/tgn/gitlab-events.json');
2828
});
2929

3030
it('can get json config for event - github', function () {
@@ -34,7 +34,7 @@
3434
});
3535

3636
it('can get json config for event - gitlab', function () {
37-
$this->bot->setPlatFormForEvent('gitlab', 'config/jsons/gitlab-events.json');
37+
$this->bot->setPlatFormForEvent('gitlab', 'storage/json/tgn/gitlab-events.json');
3838
expect($this->bot->event->getEventConfig())->toBeArray()
3939
->and($this->bot->event->getEventConfig())->toHaveKey('tag_push');
4040
});

tests/NotifierTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
});
88

99
it('validates that the event files exist', function () {
10-
$this->nofitier->setPlatFormForEvent('gitlab', 'config/jsons/gitlab-events.json');
10+
$this->nofitier->setPlatFormForEvent('gitlab', 'storage/json/tgn/gitlab-events.json');
1111
expect($this->nofitier->event->getEventConfig())->toBeArray()
1212
->and($this->nofitier->event->getEventConfig())->toHaveKey('tag_push');
1313

14-
$this->nofitier->setPlatFormForEvent('github', 'config/jsons/github-events.json');
14+
$this->nofitier->setPlatFormForEvent('github', 'storage/json/tgn/github-events.json');
1515
expect($this->nofitier->event->getEventConfig())->toBeArray()
1616
->and($this->nofitier->event->getEventConfig())
1717
->toHaveKey('issue_comment');

tests/ValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
beforeEach(function () {
77
$this->bot = new Bot();
8-
$this->bot->updateSetting('config/jsons/tgn-settings.json');
8+
$this->bot->updateSetting('storage/json/tgn/setting.json');
99
$this->bot->setPlatFormForEvent();
1010
$this->validator = new Validator($this->bot->setting, $this->bot->event);
1111
});

0 commit comments

Comments
 (0)