Skip to content

Commit

Permalink
fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
happytreees committed May 13, 2024
1 parent f461919 commit 41e80b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 53 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/notify-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ jobs:
runs-on: ubuntu-latest
name: Pull Request Notification
steps:
- run: |
echo "{\"text\":\"Vultr-CSI : PR https://github.com/${{ github.repository }}/pull/${{ github.event.number }} \"}" > mattermost.json
- uses: mattermost/[email protected]
- uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
MATTERMOST_USERNAME: ${{ secrets.MATTERMOST_USERNAME}}
MATTERMOST_ICON: ${{ secrets.MATTERMOST_ICON }}
MATTERMOST_USERNAME: ${{ secrets.MATTERMOST_USERNAME }}
MATTERMOST_ICON_URL: ${{ secrets.MATTERMOST_ICON_URL }}
TEXT: "${{ github.repository }} : PR https://github.com/${{ github.repository }}/pull/${{ github.event.number }}"
49 changes: 1 addition & 48 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func TestDriverSuite(t *testing.T) {

waitTimeout: defaultTimeout,

log: log,
vMounter: NewFakeMounter(log),
log: log,
}

go d.Run()
Expand All @@ -66,49 +65,3 @@ func TestDriverSuite(t *testing.T) {
t.Errorf("driver run failed: %s", err)
}
}

type fakeMounter struct {
log *logrus.Entry
mounted map[string]string
}

func NewFakeMounter(log *logrus.Entry) *fakeMounter {
return &fakeMounter{log: log}
}

func (f *fakeMounter) Format(source, fs string) error {
return nil
}

func (f *fakeMounter) IsFormatted(source string) (bool, error) {
return true, nil
}

func (f *fakeMounter) Mount(source, target, fs string, opts ...string) error {
return nil
}

func (f *fakeMounter) IsMounted(target string) (bool, error) {
return true, nil
}

func (f *fakeMounter) UnMount(target string) error {
delete(f.mounted, target)
return nil
}

func (f *fakeMounter) GetStatistics(volumePath string) (volumeStatistics, error) {
return volumeStatistics{
availableBytes: 3 * giB,
totalBytes: 10 * giB,
usedBytes: 7 * giB,

availableInodes: 3000,
totalInodes: 10000,
usedInodes: 7000,
}, nil
}

func (f *fakeMounter) IsBlockDevice(volumePath string) (bool, error) {
return false, nil
}

0 comments on commit 41e80b1

Please sign in to comment.