From 41e80b127426b56e9ad743064f565a25a7069140 Mon Sep 17 00:00:00 2001 From: happytreees Date: Mon, 13 May 2024 14:18:20 -0400 Subject: [PATCH] fix workflows --- .github/workflows/notify-pr.yml | 9 +++--- driver/driver_test.go | 49 +-------------------------------- 2 files changed, 5 insertions(+), 53 deletions(-) diff --git a/.github/workflows/notify-pr.yml b/.github/workflows/notify-pr.yml index c985559..d35c111 100644 --- a/.github/workflows/notify-pr.yml +++ b/.github/workflows/notify-pr.yml @@ -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/action-mattermost-notify@2.0.0 + - 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 }}" \ No newline at end of file diff --git a/driver/driver_test.go b/driver/driver_test.go index 7cfa7b7..d96fa9c 100644 --- a/driver/driver_test.go +++ b/driver/driver_test.go @@ -51,8 +51,7 @@ func TestDriverSuite(t *testing.T) { waitTimeout: defaultTimeout, - log: log, - vMounter: NewFakeMounter(log), + log: log, } go d.Run() @@ -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 -}