File: messages.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,416 kB
  • sloc: sh: 99; makefile: 21
file content (19 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package messages

import (
	"testing"

	"github.com/gophercloud/gophercloud"
	"github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/messages"
)

// DeleteMessage will delete a message. An error will occur if
// the message was unable to be deleted.
func DeleteMessage(t *testing.T, client *gophercloud.ServiceClient, message *messages.Message) {
	err := messages.Delete(client, message.ID).ExtractErr()
	if err != nil {
		t.Fatalf("Failed to delete message %s: %v", message.ID, err)
	}

	t.Logf("Deleted message: %s", message.ID)
}