Merge pull request #71217 from jsafrane/status-update-unit-test

CSI v1 leftovers
This commit is contained in:
k8s-ci-robot 2018-11-29 15:26:53 -08:00 committed by GitHub
commit 81eb9ce491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 25 additions and 14 deletions

View File

@ -92492,7 +92492,7 @@
"description": "VolumeError captures an error encountered during a volume operation.",
"properties": {
"message": {
"description": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
"description": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.",
"type": "string"
},
"time": {
@ -92870,7 +92870,7 @@
"description": "VolumeError captures an error encountered during a volume operation.",
"properties": {
"message": {
"description": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
"description": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.",
"type": "string"
},
"time": {

View File

@ -2255,7 +2255,7 @@
},
"message": {
"type": "string",
"description": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information."
"description": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information."
}
}
},

View File

@ -2093,7 +2093,7 @@
},
"message": {
"type": "string",
"description": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information."
"description": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information."
}
}
},

View File

@ -770,7 +770,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">message</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>

View File

@ -1190,7 +1190,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">message</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>

View File

@ -195,7 +195,7 @@ type VolumeError struct {
Time metav1.Time
// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
Message string

View File

@ -70,6 +70,8 @@ type StatusREST struct {
store *genericregistry.Store
}
var _ = rest.Patcher(&StatusREST{})
// New creates a new VolumeAttachment resource
func (r *StatusREST) New() runtime.Object {
return &storageapi.VolumeAttachment{}

View File

@ -113,9 +113,18 @@ func TestVolumeAttachmentStatusStrategy(t *testing.T) {
t.Errorf("unexpected objects differerence after modifying status: %v", diff.ObjectDiff(statusVolumeAttachment, expectedVolumeAttachment))
}
// modifying spec should be dropped
// spec and metadata modifications should be dropped
newVolumeAttachment := volumeAttachment.DeepCopy()
newVolumeAttachment.Spec.NodeName = "valid-node-2"
newVolumeAttachment.Labels = map[string]string{"foo": "bar"}
newVolumeAttachment.Annotations = map[string]string{"foo": "baz"}
newVolumeAttachment.OwnerReferences = []metav1.OwnerReference{
{
APIVersion: "v1",
Kind: "Pod",
Name: "Foo",
},
}
StatusStrategy.PrepareForUpdate(ctx, newVolumeAttachment, volumeAttachment)
if !apiequality.Semantic.DeepEqual(newVolumeAttachment, volumeAttachment) {

View File

@ -178,7 +178,7 @@ message VolumeError {
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
optional string message = 2;

View File

@ -204,7 +204,7 @@ type VolumeError struct {
Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`

View File

@ -109,7 +109,7 @@ func (VolumeAttachmentStatus) SwaggerDoc() map[string]string {
var map_VolumeError = map[string]string{
"": "VolumeError captures an error encountered during a volume operation.",
"time": "Time the error was encountered.",
"message": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
"message": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.",
}
func (VolumeError) SwaggerDoc() map[string]string {

View File

@ -178,7 +178,7 @@ message VolumeError {
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 1;
// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
optional string message = 2;

View File

@ -204,7 +204,7 @@ type VolumeError struct {
Time metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
// String detailing the error encountered during Attach or Detach operation.
// This string maybe logged, so it should not contain sensitive
// This string may be logged, so it should not contain sensitive
// information.
// +optional
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`

View File

@ -109,7 +109,7 @@ func (VolumeAttachmentStatus) SwaggerDoc() map[string]string {
var map_VolumeError = map[string]string{
"": "VolumeError captures an error encountered during a volume operation.",
"time": "Time the error was encountered.",
"message": "String detailing the error encountered during Attach or Detach operation. This string maybe logged, so it should not contain sensitive information.",
"message": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.",
}
func (VolumeError) SwaggerDoc() map[string]string {