code: func WaitForInspectResult(t testingT, name, expr, expected string, timeout time.Duration, cmdOperators ...CmdOperator) {
  	after := time.After(timeout)
  
  	args := []string{"inspect", "-f", expr, name}
  	for {
  		result := Docker(Args(args...), cmdOperators...)
  		if result.Error != nil {
  			if !strings.Contains(strings.ToLower(result.Stderr()), "no such") {
  				t.Fatalf("error executing docker inspect: %v\n%s",
  					result.Stderr(), result.Stdout())
  			}
  			select {
  			case <-after:
  				t.Fatal(result.Error)
  			default:
  				time.Sleep(10 * time.Millisecond)
  				continue
  			}
  		}
  
  		out := strings.TrimSpace(result.Stdout())
  		if out == expected {
  			break
  		}
  
  		select {
  		case <-after:
  			t.Fatalf("condition \"%q == %q\" not true in time (%v)", out, expected, timeout)
  		default:
  		}
  
  		time.Sleep(100 * time.Millisecond)
  	}
  }
docs: // WaitForInspectResult waits for the specified expression to be equals to the specified expected string in the given time.